package com.wbao.dianniu.emojiUtils;

import android.graphics.Color;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

import com.wbao.dianniu.customView.ClickSpan;

/**
 * Created by yejianjun on 2018/5/22.
 */

public abstract class MyClickableSpan extends ClickableSpan {

    private Integer id;

    public MyClickableSpan(Integer id){
        this.id = id;
    }

    @Override
    public void onClick(View widget) {
        onClick(widget,id);
    }

    @Override
    public void updateDrawState(TextPaint ds) {
        super.updateDrawState(ds);
        ds.setColor(Color.BLUE);
        ds.setUnderlineText(false);
    }

    public abstract void onClick(View widget,int id);

}
